package hu.rsc.forbiddenwords.server.persistent;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class Language {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    @Persistent
    private String name;

    @Persistent
    private String code;

    // Accessors for the fields. JDO doesn't use these, but your application does.

    public Language(String name, String code) {
	super();
	this.name = name;
	this.code = code;
    }

    public String getCode() {
	return this.code;
    }

    public Key getKey() {
	return this.key;
    }

    public String getName() {
	return this.name;
    }

    public void setCode(String code) {
	this.code = code;
    }

    public void setKey(Key key) {
	this.key = key;
    }

    public void setName(String name) {
	this.name = name;
    }

}